import cv2   #导入OpenCV库
image=cv2.imread("che.png",cv2.IMREAD_GRAYSCALE)
cv2.imshow("che",image)
k=cv2.waitKey()
if k==ord('s'):
    cv2.imwrite("D:/save_che.jpg",image)
cv2.destroyWindows()  #释放所有窗口